package com.shengwei.truck.driver.view.selfview.chart;

import com.github.mikephil.charting.charts.BarLineChartBase;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.shengwei.truck.driver.utils.MyLogCat;

/**
 * Created by xw.gao
 */
public class XAxisMonthValueFormatter implements IAxisValueFormatter {
    String TAG = "XAxisMonthValueFormatter";
    private final BarLineChartBase<?> chart;
    private int mMonth;

    public void setMonth(int month){
        mMonth = month;
    }

    public XAxisMonthValueFormatter(BarLineChartBase<?> chart,int month) {
        this.chart = chart;
        mMonth = month;
    }
    @Override
    public String getFormattedValue(float value, AxisBase axis) {
        int days = (int) value;
        MyLogCat.i(TAG, "value=" + value);
        String xLabel = mMonth+"."+days;
        return xLabel;
    }
}
